<?php echo $this->render('collection/site/_tab.phtml');?>
<form action="" method="post" enctype="multipart/form-data">
<?php echo $this->form()->hidden('referer', $this->referer) . "\n";?>
<div class="body">
	<table class="form">
		<tr>
			<th colspan="2"><?php echo $this->language('SITE INFORMATION');?>:</th>
			<th><?php echo $this->language('SITE COVER IMAGE');?>:</th>
		</tr>
		<tr>
			<td width="180"><label><span class="red">*</span> <?php echo $this->language('Name');?></label></td>
			<td width="60%">
				<?php echo $this->form()->text('name', $this->row->getName(), array('size' => '20', 'maxlength' => '20'));?>
				<code><?php echo $this->language('Between 2~20 characters and constructed by [a-zA-Z0-9_-].');?>.</code>
			</td>
			<td rowspan="6"><?php echo $this->partial('picture/_inc/uploadInput.phtml', array('image' => $this->row->getCover(), 'name' => 'cover', 'edit' => $this->row->getId()));?></td>
		</tr>
		<tr>
			<td><label><span class="red">*</span> <?php echo $this->language('Title');?></label></td>
			<td><?php echo $this->form()->text('title', $this->row->getTitle(), array('size'=>'50', 'maxlength'=>'50'));?><code><?php echo $this->language('Between 1~50 characters');?>.</code></td>
		</tr>
		<tr>
			<td><label><span class="red">*</span> <?php echo $this->language('URL');?></label></td>
			<td><?php echo $this->form()->text('url', $this->row->getUrl(), array('size' => '50', 'maxlength' => '250'));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Encoding');?></label></td>
			<td><select name="charset"><?php 
			foreach(new system_setting_charset() AS $cs) {
				echo '<option value="' . $cs . '"';
				if($this->row->getCharset() == $cs) {
					echo ' selected="selected"';
				}
				echo '>' . $cs . '</option>';
			}
			?></select></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Actived');?></label></td>
			<td><?php echo $this->form()->select('is_active', $this->row->getIsActive(), array(), array('0' => 'No', '1' => 'Yes'));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Description');?></label></td>
			<td><?php echo $this->form()->textarea('description', $this->row->getDescription(), array('style' => 'width:80%', 'rows' => '4'));?></td>
		</tr>
	</table>
</div>
<?php echo $this->partial('collection/_inc/_ruleIndex.phtml', array('rule' => $this->row->getRule(), 'isNew' => false));?>
<?php echo $this->partial('collection/_inc/_ruleItem.phtml', array('rule' => $this->row->getItemRule(), 'isNew' => false));?>
<?php echo $this->partial('collection/_inc/_ruleSpecial.phtml', array('rule' => $this->row->getSpecialRule(), 'isNew' => false));?>
<div class="body">
	<table class="form">
		<tr>
			<td width="180"></td>
			<td>
				<button type="submit" name="submit" value="submit"><?php echo $this->language('Submit');?></button>
				<?php if($this->row->getId()) {echo $this->render('include/deleteButton.phtml');}?>
			</td>
		</tr>
	</table>
</div>
</form>
